package com.hxkj.client.service;

import com.hxkj.domain.po.AdvertisementColumn;
import com.hxkj.domain.po.AdvertisementColumnTree;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

/**
 * @InterfaceName 广告分类对外接口
 * @Description
 * @Author chenfangzhou
 * @Date 2018/9/9 11:54
 * @Version 1.0
 */
@FeignClient(name = "cms-article")
public interface AdvertisementColumnServiceClient {

    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author chenfagnzhou
     * @Description saveColumn 新增分类
     * @Date 15:19 2018/9/9
     * @Param [column]
     **/
    @RequestMapping(value = "/advertisementColumn/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct saveColumn(@RequestBody AdvertisementColumn column) throws Exception;


    /**
     * @return com.hxkj.domain.po.ColumnTree
     * @author chenfagnzhou
     * @Description getColumnTreeList 获取分类树形结构列表
     * @Date 15:20 2018/9/9
     * @Param [column]
     **/
    @RequestMapping(value = "/advertisementColumn/getlisttree", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    List<AdvertisementColumnTree> getColumnTreeList(@RequestBody AdvertisementColumn column) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author chenfagnzhou
     * @Description removerColumn 删除分类
     * @Date 15:20 2018/9/9
     * @Param [column]
     **/
    @RequestMapping(value = "/advertisementColumn/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct removeColumn(@RequestBody AdvertisementColumn column) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author chenfagnzhou
     * @Description modifyColumn 修改分类
     * @Date 15:22 2018/9/9
     * @Param [column]
     **/
    @RequestMapping(value = "/advertisementColumn/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct modifyColumn(@RequestBody AdvertisementColumn column) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author chenfagnzhou
     * @Description modifySortNum 增加分类排序
     * @Date 9:48 2018/6/8
     * @Param [map]
     **/
    @RequestMapping(value = "/advertisementColumn/modifysortnum", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct modifySortNum(@RequestBody Map<String, Object> map) throws Exception;


    /**
     * @return
     * @author zzx
     * @Description getChildren  获取分类父类下所有得子类
     **/
    @RequestMapping(value = "/advertisementColumn/getChildren", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    List<AdvertisementColumn> getChildren(@RequestBody AdvertisementColumn column) throws Exception;

    /**
     * @return
     * @author zzx
     * @Description getChildren  获取一条分类信息
     **/
    @RequestMapping(value = "/advertisementColumn/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    AdvertisementColumn getColumn(@RequestBody AdvertisementColumn column) throws Exception;

    /**
     * 查询所有分类
     *
     * @param column
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/advertisementColumn/getColumnList", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<List<AdvertisementColumn>> getColumnList(@RequestBody AdvertisementColumn column) throws Exception;

    /**
     * 根据的分类获取整个分类信息
     *
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/advertisementColumn/getTopParentColumn", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    List<AdvertisementColumn> getTopParentColumn(@RequestBody AdvertisementColumn column) throws Exception;


    /**
     * 获取该站点下的分类数据
     *
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/advertisementColumn/getAllColumnList", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    public ResultDataStruct<List<AdvertisementColumn>> getAllColumnList(@RequestBody AdvertisementColumn column) throws Exception;

    //分类列表的模糊查询
    @RequestMapping(value = "/advertisementColumn/getlisttreebykeyword", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    List<AdvertisementColumnTree> getColumnTreeListByKeyword(@RequestBody AdvertisementColumn column) throws Exception;

}
